package com.zhkj.txg.module.product.entity

import com.chad.library.adapter.base.entity.MultiItemEntity
import com.google.gson.annotations.SerializedName

const val ITEM_TYPE_PRODUCT = 0
const val ITEM_TYPE_COMMENT = 1
const val ITEM_TYPE_DETAIL = 2

data class ProductUIProductEntity(
    @SerializedName("goods_name")
    val goodsName: String = "",
    val video: String = "",
    @SerializedName("market_price")
    val marketPrice: String = "",
    @SerializedName("sales_sum")
    val saleCount: Int = 0,
    @SerializedName("store_count")
    val storeCount: Int = 0,
    val images: MutableList<String> = mutableListOf(),
    val rank: Int = 0,
    val spec: MutableList<SpecEntity> = mutableListOf(),
    @SerializedName("spec_goods_price")
    val specPrice: MutableList<SpecPriceEntity> = mutableListOf(),
    @SerializedName("is_new")
    val isNew: String = "",
    @SerializedName("is_hot")
    val isHot: String = "",
    val service: MutableList<ServiceTagEntity> = mutableListOf(),
    val location: String = "",
    val price: String = ""
) : MultiItemEntity {
    override val itemType: Int = ITEM_TYPE_PRODUCT
}

data class ProductUICommentEntity(
    val shop: ShopEntity? = null,
    val comment: CommentEntity? = null
) : MultiItemEntity {
    override val itemType: Int = ITEM_TYPE_COMMENT
}

data class ProductUIDetailEntity(
    val detail: String = ""
) : MultiItemEntity {
    override val itemType: Int = ITEM_TYPE_DETAIL
}